<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" class="app">
<head>  
  <meta charset="utf-8" />
  <title>审核管理－商家审核查看</title>
  <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
  <jsp:include page="../lbi/common.jsp"></jsp:include>
</head>
<body class="">
  <section class="vbox">
    <jsp:include page="../lbi/head.jsp" ></jsp:include>
    <section>
      <section class="hbox stretch">
        <!-- .aside -->
    	    <jsp:include page="../lbi/left.jsp" ></jsp:include>
        <!-- /.aside -->
        <section id="content">
	      		  <section class="hbox stretch">
	        			  <section id="content">
	   					 <section class="hbox stretch">
	        <!--从这里开始复制粘贴-->
	        <section class="vbox">
	            <section class="scrollable wrapper w-f">
	                <section class="panel panel-default">
	                    <div class="row">
                    		<div class="col-xs-2 inform_left">
                    			商家LOGO
                    		</div>
                    		<div class="col-xs-4 inform_right">
                                 <c:if test="${merchantEntity.merLogo !=null }">
                                    <img src="http://qiniu.images.69mark.com/${merchantEntity.merLogo }" alt="">
                                  </c:if>
                                  
                                  <c:if test="${merchantEntity.merLogo ==null }">
                                     <img src="" alt="">
                                 </c:if>  
                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			商家类型
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.shopTypeName } ${merchantEntity.shopTypeTwoName }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			门店名称
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.shopName }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			法人
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.legalPersonName }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			地址
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.province } ${merchantEntity.addressDetail }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			门店号码
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.telphone }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			人均消费
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>¥${merchantEntity.avgPrice }/人</p>
	                    		</div>
	                    </div>
	                    
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			商家介绍
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.intro }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			经营者姓名
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.bossName }</p>
	                    		</div>
	                    </div>
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			手机号码
	                    		</div>
	                    		<div class="col-xs-4 inform_right">
	                    			<p>${merchantEntity.mobile }</p>
	                    		</div>
	                    </div>
	                    
	                    <div class="row">
	                    		<div class="col-xs-2 inform_left">
	                    			证件照片
	                    		</div>
	                    		<div class="col-xs-8 image">
	                    		     <span class="example">
		                    		     <c:if test="${merchantEntity.cardFrontPhoto !=null }">
	                                        <p><img src="http://qiniu.images.69mark.com/${merchantEntity.cardFrontPhoto }" alt=""></p>
	                                     </c:if>
	                                     
	                                     <c:if test="${merchantEntity.cardFrontPhoto ==null }">
                                            <p><img src="" alt=""></p>
                                        </c:if>	                    			
	                    			
								    </span>
									<span class="example">
									    <c:if test="${merchantEntity.cardBackPhoto !=null }">
	                                            <p><a><img src="http://qiniu.images.69mark.com/${merchantEntity.cardBackPhoto }" alt=""></a></p>
	                                         </c:if>
	                                         
	                                         <c:if test="${merchantEntity.cardBackPhoto ==null }">
	                                            <p><a><img src="" alt=""></a></p>
	                                        </c:if>  
									</span>
									<span class="example">
									    <c:if test="${merchantEntity.businessLicensePhoto !=null }">
                                            <p><img src="http://qiniu.images.69mark.com/${merchantEntity.businessLicensePhoto }" alt=""></p>
                                         </c:if>
                                         
                                         <c:if test="${merchantEntity.businessLicensePhoto ==null }">
                                            <p><img src="" alt=""></p>
                                        </c:if> 
									</span>
	                    		</div>
	                    </div>
	                    
	                    <div class="row">
                    		<div class="col-xs-2 inform_left">
                    			审核：
                    		</div>
                    		<div class="col-xs-4 inform_right">
                    		    <c:if test="${merchantEntity.isAuth ==1 || merchantEntity.isAuth ==2 }">
	                    		     <p style="margin-top: 5px;">
	                    		     	
	                    		        <span><input class="peo" type="radio" name="isAuth" value="2" checked="checked"/>&nbsp;通过</span>
                                        <span style="padding-left: 20px;"><input class="peo" type="radio" name="isAuth" value="3" />&nbsp;拒绝</span>
                                     </p>
                                    <div id="show2" style="display: none;">
                                        <textarea rows="3" id="refuse" placeholder="填写拒绝理由">${merchantEntity.refuse }</textarea>
                                    </div>
                    		    </c:if>
                    		    
                    		    <c:if test="${merchantEntity.isAuth ==3 }">
                                        <p style="margin-top: 5px;">
                                           <span><input class="peo" type="radio" name="isAuth" value="2" />&nbsp;通过</span>
                                           <span style="padding-left: 20px;">
                                               <input class="peo" type="radio" name="isAuth" value="3" checked="checked" />&nbsp;拒绝
                                           </span>
                                        </p>
                                       <div id="show2">
                                           <textarea rows="3" id="refuse" placeholder="填写拒绝理由">${merchantEntity.refuse }</textarea>
                                       </div>
                                   </c:if>
                    		</div>
	                    </div>
	                </section>
	            </section>
	            <footer class="footer bg-white b-t">
	                <div class="row text-center-xs">
	                    <div class="col-md-6 hidden-sm">
	                   		<a href=""><button onclick ="javascript:history.go(-1);">上一步</button></a>
	                        <a onclick="delfuncitem('${merchantEntity.shopId}');return false;"><button>提交</button></a>
	                    </div>
	                    <div class="col-md-6 col-sm-12 text-right text-center-xs">
	                       
	                    </div>
	                </div>
	            </footer>
	        </section>
	        
	        <!--以上为内容-->
	        <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
	    </section>
				      </section>
	
	      		  </section>
	      	 </section>
    </section>
  </section>
  </section>
   
  <script>
  var _serviceURL = '/69mark/web';
  
  function delfuncitem(thisid){
	  var isAuth = $('input:radio[name="isAuth"]:checked').val();
	  var refuse = $("#refuse").val();
      layer.confirm('确定提交？',{btn:['确定','取消']},function(){
                  $.ajax({
                      type:'POST',
                      url:_serviceURL+'/toUpdateIsAuthId.do',
                      data:'id='+thisid+"&isAuth="+isAuth+"&refuse="+refuse,
                      success:function(data){
                          if(data==1){
                              layer.msg('提交成功',{
                                  time: 2000,
                              });
                              window.location.href =_serviceURL+"/toWebMerchantIndex.do"
                          }else{
                              layer.msg(data,{
                                  time: 2000,
                              });
                          }
                      }
                  });
              }
      );
  }
  
    $('.example img').zoomify();
    
    $("#shop").addClass("active");
    $("#list_shop").addClass("active2");
	
	$("#nav_2").css('display','block');
    
  	$(function(){
	   $(".peo").click(function(){
	  if($(this).attr("value")=="3")
	   $("#show2").show();
	  else
	   $("#show2").hide();
	   });
	});
  </script>
 
</body>
</html>